D99501-ignore-lto-auto
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Mon, 27 Sep 2021 15:53:42 +0000 (16:53 +0100)
committerGianfranco Costamagna <locutusofborg@debian.org>
Mon, 27 Sep 2021 15:53:42 +0000 (16:53 +0100)
===================================================================

Gbp-Pq: Name D99501-ignore-lto-auto.diff

clang/include/clang/Driver/Driver.h
clang/lib/Driver/Driver.cpp

index f9528641073a4b6dc21eea99a3ebf9fc1c27c026..54bb0b26865b6627fbfca4ded8008216b920d43b 100644 (file)
@@ -49,7 +49,8 @@ enum LTOKind {
   LTOK_None,
   LTOK_Full,
   LTOK_Thin,
-  LTOK_Unknown
+  LTOK_Unknown,
+  LTOK_Ignored
 };
 
 /// Driver - Encapsulate logic for constructing compilation processes
index a9a273529b4611ddd89e216102a423b0cac438d1..3fe9ae1e22ca1807e4875b7deecb96a1a8631674 100644 (file)
@@ -557,9 +557,12 @@ void Driver::setLTOMode(const llvm::opt::ArgList &Args) {
   LTOMode = llvm::StringSwitch<LTOKind>(LTOName)
                 .Case("full", LTOK_Full)
                 .Case("thin", LTOK_Thin)
+                .Case("auto", LTOK_Ignored)
+                .Case("jobserver", LTOK_Ignored)
                 .Default(LTOK_Unknown);
 
   if (LTOMode == LTOK_Unknown) {
+    // FIXME: check if argument is a number, then ignore, or handle it
     assert(A);
     Diag(diag::err_drv_unsupported_option_argument) << A->getOption().getName()
                                                     << A->getValue();